package com.tang.portal.component.pay;

import com.tang.common.properties.sys.CoolTeaProperties;
import com.tang.portal.component.pay.model.callback.CallBack;
import com.tang.portal.component.pay.model.create.req.base.CreatePay;
import com.tang.portal.component.pay.model.create.res.base.CreatePayResponse;
import com.tang.portal.component.pay.model.refund.req.base.Refund;
import com.tang.portal.component.pay.model.refund.res.base.RefundResponse;
import com.tang.portal.component.pay.model.withdraw.req.base.Withdraw;
import com.tang.portal.component.pay.model.withdraw.res.base.WithdrawResponse;

import jakarta.annotation.Resource;

/**
 * @author tang jun liang
 * @Date 2023/6/25 13:36
 */
public interface PayService<TCreatePay extends CreatePay, TCreatePayResponse extends CreatePayResponse,
        TRefund extends Refund, TRefundResponse extends RefundResponse, TWithdraw extends Withdraw, TWithdrawResponse extends WithdrawResponse
        , TCallBack extends CallBack
        > {



    /**
     * 创建支付
     * @param createPay
     * @return
     */
    TCreatePayResponse create(TCreatePay createPay);


    /**
     * 退款
     * @param refund
     * @return
     */
    TRefundResponse refund(TRefund refund);


    /**
     * 提现
     * @param withdraw
     * @return
     */
    TWithdrawResponse withdraw(TWithdraw withdraw);


    /**
     * 回调验证
     * @param callBack
     */
    void callBack(TCallBack callBack);
}
